(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/home/components/meet-again-coupons/index" ], {
    "5ac8": function(e, t, n) {},
    "6e2d": function(e, t, n) {
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return u;
        }), n.d(t, "a", function() {});
        var o = function() {
            this.$createElement;
            this._self._c;
        }, u = [];
    },
    9894: function(e, t, n) {
        var o = n("5ac8");
        n.n(o).a;
    },
    adc3: function(e, t, n) {
        n.r(t);
        var o = n("6e2d"), u = n("d118");
        for (var a in u) [ "default" ].indexOf(a) < 0 && function(e) {
            n.d(t, e, function() {
                return u[e];
            });
        }(a);
        n("9894");
        var c = n("f0c5"), r = Object(c.a)(u.default, o.b, o.c, !1, null, "954f6c0c", null, !1, o.a, void 0);
        t.default = r.exports;
    },
    c11b: function(e, t, n) {
        var o = n("4ea4").default;
        Object.defineProperty(t, "__esModule", {
            value: !0
        }), t.default = void 0;
        var u = o(n("a34a")), a = o(n("c973")), c = o(n("ded3")), r = n("8f93"), i = n("fd0e"), s = n("665c"), l = o(n("0613")), p = n("05dc"), f = {
            setup: function(e, t) {
                var n = t.emit;
                (0, i.onBeforeMount)(function() {
                    n("loaded", {
                        tryOpen: b
                    });
                });
                var o = !1, f = (0, i.ref)(!1), d = (0, i.ref)(0), m = (0, i.ref)([]), v = (0, s.useGetters)().isLogined, _ = (0, 
                i.computed)(function() {
                    var e = 0, t = 0;
                    return m.value.forEach(function(n) {
                        1 === n.business_type ? e++ : 2 === n.business_type && t++;
                    }), {
                        isSingle: 0 === t && 1 === e,
                        couponCount: e,
                        taskCount: t
                    };
                }), g = (0, i.computed)(function() {
                    var e = m.value.filter(function(e) {
                        return 1 === e.business_type;
                    })[0] || {}, t = 2 === e.discount_type ? e.discount_rate / 10 : e.discount_amount / 100;
                    return (0, c.default)((0, c.default)({}, e), {}, {
                        shownAmount: t,
                        isSmallAmount: String(t).length >= 5,
                        shownUnit: 2 === e.discount_type ? "折" : "元"
                    });
                });
                function h(e) {
                    l.default.commit("setState", e);
                }
                (0, i.watch)(function() {
                    return v.value;
                }, function(e) {
                    e || (f.value && k("logout-close"), o = !1, m.value = [], h({
                        meetAgainCouponsDisplayed: !1
                    }));
                });
                var y = null;
                function b() {
                    return x.apply(this, arguments);
                }
                function x() {
                    return (x = (0, a.default)(u.default.mark(function e() {
                        var t;
                        return u.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, w();

                              case 2:
                                return t = e.sent, e.abrupt("return", new Promise(function(e) {
                                    y = e, t.list.length ? (d.value = t.user_type, m.value = t.list.slice(0, 4), f.value = !0, 
                                    h({
                                        meetAgainCouponsDisplayed: !0
                                    }), S()) : k();
                                }));

                              case 4:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))).apply(this, arguments);
                }
                function w() {
                    return C.apply(this, arguments);
                }
                function C() {
                    return (C = (0, a.default)(u.default.mark(function e() {
                        var t, n, a, c, i;
                        return u.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                if (t = {
                                    user_type: 0,
                                    list: []
                                }, !o) {
                                    e.next = 3;
                                    break;
                                }
                                return e.abrupt("return", t);

                              case 3:
                                return o = !0, e.prev = 4, e.next = 7, (0, r.getMeetAgainCouponList)({
                                    city_id: (null === (n = l.default.getters.startAddress) || void 0 === n ? void 0 : n.city_id) || 0,
                                    is_new_user: l.default.state.userVariables.home_index_reduce_noise_ab > 0 ? 1 : 0
                                });

                              case 7:
                                0 === (i = e.sent).ret && null !== (a = i.data) && void 0 !== a && null !== (c = a.list) && void 0 !== c && c.length && (t.user_type = i.data.user_type, 
                                t.list = i.data.list), e.next = 14;
                                break;

                              case 11:
                                e.prev = 11, e.t0 = e.catch(4), console.error(e.t0);

                              case 14:
                                return e.abrupt("return", t);

                              case 15:
                              case "end":
                                return e.stop();
                            }
                        }, e, null, [ [ 4, 11 ] ]);
                    }))).apply(this, arguments);
                }
                function k() {
                    var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "close";
                    f.value = !1, null === (e = y) || void 0 === e || e({
                        type: t
                    });
                }
                function S() {
                    var e = {
                        3: "大车",
                        4: "小车"
                    }, t = {
                        1: "立减券/满减券",
                        2: "折扣券",
                        3: "完单返积分",
                        4: "完单返券",
                        5: "完单返券",
                        8: "完单返现"
                    }, n = [], o = [];
                    m.value.forEach(function(u) {
                        n.push(e[u.business_line]), o.push(t[u.discount_type]);
                    }), (0, p.statistics)("homepage_group_pop_expo", {
                        frame_city: l.default.getters.commonStatisticsState.frame_city,
                        pop_type: _.value.isSingle ? "单权益" : "多权益样式",
                        group_name: {
                            1: "历史注册未完单新客",
                            3: "大车休眠用户",
                            4: "小车休眠用户"
                        }[d.value] || "",
                        coupon_type: n.join(","),
                        rights_type: o.join(","),
                        coupon_cnt: _.value.couponCount,
                        user_task_cnt: _.value.taskCount
                    });
                }
                function O(e) {
                    (0, p.statistics)("homepage_group_pop_click", {
                        frame_city: l.default.getters.commonStatisticsState.frame_city,
                        module_name: e
                    });
                }
                return Object.assign({
                    isShow: f,
                    user_type: d,
                    couponList: m,
                    singleObj: _,
                    singleCoupon: g,
                    handleConfirm: function() {
                        O("开心收下"), k("manual-close");
                    },
                    handleClose: function() {
                        O("关闭"), k("manual-close");
                    }
                }, {
                    tryOpen: b
                });
            }
        };
        f.components = Object.assign({
            CouponCard: function() {
                n.e("pages/home/components/meet-again-coupons/coupon-card").then(function() {
                    return resolve(n("f1e9"));
                }.bind(null, n)).catch(n.oe);
            }
        }, f.components);
        var d = f;
        t.default = d;
    },
    d118: function(e, t, n) {
        n.r(t);
        var o = n("c11b"), u = n.n(o);
        for (var a in o) [ "default" ].indexOf(a) < 0 && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(a);
        t.default = u.a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "pages/home/components/meet-again-coupons/index-create-component", {
    "pages/home/components/meet-again-coupons/index-create-component": function(e, t, n) {
        n("543d").createComponent(n("adc3"));
    }
}, [ [ "pages/home/components/meet-again-coupons/index-create-component" ] ] ]);